
<div ng-controller="RenewalCtrl">
	
	<div class="page-heading">
		<ul class="breadcrumb" >
			<li><a href="javascript:;">报表管理</a></li>
			<li>绩效管理</li>
			<li class="active">续保</li>
			<span style="margin-right:10px;"  class="btn btn-danger btn-xs pull-right btn-flag " ng-show="flag" ng-click="delFlag('/performance/renewal/')"><i class="fa fa-times"></i> 删除 </span>
			<span style="margin-right:10px;"  class="btn btn-info btn-xs pull-right btn-flag " ng-click="addFlag('#/performance/renewal/')"><i class="fa fa-star"></i> 收藏 </span>	
		</ul>
		
	</div>
	<!-- 页面头部  end-->

	<!--页面内容显示区域-->
	<div class="wrapper">
		<div class="row">
			<div class="col-sm-12">
				<!--表格显示区域-->
				<section class="panel">
					<!--区块头 显示表格名称和功能按钮-->
					<header class="panel-heading">
						查询条件
						<!--控制按钮-->
						<span class="tools pull-right"> <!--收起-->
							<button type="button" class="btn btn-success pull-left" ng-click="SearchData()"
								style="margin-left: 5px;">
								<i class="fa fa-search" ></i> 查询
							</button>
							<button type="button" class="btn btn-info  pull-left" ng-click="ExportData()"
								style="margin-left: 5px;">
								<i class="fa fa-table"></i> 导出EXCEL
							</button> <a href="javascript:;" class="fa fa-chevron-up form_display"></a>

						</span>
					</header>
					<!--区块body 显示表格内容-->
					<div class="panel-body form-horizontal form_hide">
						<div class="row">
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">事业部</label>
										<div class="col-lg-8 col-sm-7">
										<input type="text" id="entity_group_name"  ng-keyup="clearGroup()"  name="entity_group_name"   class="form-control select_edit form_params" />
                                            <ul class="select_list">
                                                  <li ng-repeat="e in groups" ng-click='LoadBrands(e.group_name)' val_code="{{e.group_name}}" val_name="{{e.group_name}}">{{e.group_name}}</li>
                                            </ul>  
                                            </div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">店面品牌</label>
									<div class="col-lg-8 col-sm-7">
										<input type="text" id="entity_brand_name" ng-keyup="clearGroupBrand()" name="entity_brand_name" class="form-control select_edit form_params" value=""/>
                                            <ul class="select_list">
                                                  <li ng-repeat="e in gBrands" ng-click='LoadEntitys(e)' val_code="{{e.brand_code}}" val_name="{{e.brand_name}}">{{e.brand_name}}</li>
                                            </ul> 
									</div>
								</div>
							</div>
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">店面信息</label>
										<div class="col-lg-8 col-sm-7">
										<input type="text" id="entity_name" name="entity_name" class="form-control select_edit form_params" value=""/>
										<input type="hidden" id="entity_code" name="entity_code"  class="form-control select_value form_params" value=""/>
                                            <ul class="select_list">
                                                  <li ng-repeat="e in entitys" ng-click='LoadEmps(e)' val_code="{{e.entity_code}}" val_name="{{e.entity_name}}">{{e.entity_name}}({{e.entity_code}})</li>
                                            </ul>   
                                      </div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">年度</label>
									<div class="col-lg-8 col-sm-7">
										<input name="report_year" id="report_year" type="number" min="0" onkeyup="value=value.replace(/[^\d]/g,'') " class="form-control form_params" />
									</div>
								</div>
							</div>
							
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">月份</label>
									<div class="col-lg-8 col-sm-7">
										<select name="report_month" id="report_month"  class="form-control form_params" >
									        <option  value="01">01</option>
											<option  value="02">02</option>
											<option  value="03">03</option>
											<option  value="04">04</option>
											<option  value="05">05</option>
											<option  value="06">06</option>
											<option  value="07">07</option>
											<option  value="08">08</option>
											<option  value="09">09</option>
											<option  value="10">10</option>
											<option  value="11">11</option>
											<option  value="12">12</option>
										</select>
										
									</div>
								</div>
							</div>
							
							<div class="col-md-3" style="display: none;" id="empsDiv">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">续保人</label>
									<div class="col-lg-8 col-sm-7">
									     <select name="emps" id="emps" multiple="multiple" class="form-control form_params">
									     <option value="">1123</option>
										 </select>
									</div>
								</div>
							</div>
						</div>
					</div>
				</section>

				<section class="panel">
					<!--区块头 显示表格名称和功能按钮-->
					<header class="panel-heading">
						续保绩效信息

						<!--控制按钮-->
						<span class="tools pull-right"> <!--收起--> <a
							href="javascript:;" class="fa fa-chevron-down"></a>
						</span>
						
					</header>
					<!--区块body 显示表格内容-->
					<div class="panel-body form-horizontal ">

						<div class="adv-table" style="overflow-x: scroll">
							<table id="RenewalTable"
								class="table table-striped  nowrap  dataTable no-footer table_store table-hover float_head"
								cellspacing="0" width="100%">
								<thead>
									<tr>
										<th ></th>
										<th colspan="4"></th>
										<th colspan="3"></th>
										<th colspan="2">续保保费</th>
										<th colspan="2"></th>
										<th colspan="5">投保占比</th>
									</tr>
									<tr>
										<th ng-show="!cols.contains('index')" >序号</th>
										<th ng-show="!cols.contains('entity_code')" column="entity_code">店面编码</th>
										<th ng-show="!cols.contains('entity_name')" column="entity_name">店面名称</th>
										<th ng-show="!cols.contains('entity_brand_name')" column="entity_brand_name">品牌</th>
										<th ng-show="!cols.contains('entity_group_name')" column="entity_group_name">事业部</th>
										<th ng-show="!cols.contains('insBrokeName')" column="insBrokeName">续保员</th>
										<th ng-show="!cols.contains('renewalCount')" column="renewalCount">续保单数</th>
										<th ng-show="!cols.contains('totalAmount')" column="totalAmount">续保保费</th>
										<th ng-show="!cols.contains('totalTrafficAmount')" column="totalTrafficAmount">交强险</th>
										<th ng-show="!cols.contains('totalBusinessAmount')" column="totalBusinessAmount">商业险</th>
										<th ng-show="!cols.contains('renewalAmount')" column="renewalAmount">续保佣金</th>
										<th ng-show="!cols.contains('rate')" column="rate">投保留存率</th>
										<th ng-show="!cols.contains('renshouRate')" column="renshouRate">人保占比</th>
										<th ng-show="!cols.contains('taipingyangRate')" column="taipingyangRate">太平洋占比</th>
										<th ng-show="!cols.contains('pinganRate')" column="pinganRate">平安占比</th>
										<th ng-show="!cols.contains('lianheRate')" column="lianheRate">中华联合占比</th>
										<th ng-show="!cols.contains('otherRate')" column="otherRate">其他占比</th>
										
									</tr>
								</thead>
								<tbody>
									<tr ng-repeat="c in datas" >
										<td ng-show="!cols.contains('index')" >{{$index+1}}</td>
										<td ng-show="!cols.contains('entity_code')" column="entity_code">{{c.entity_code}}</td>
										<td ng-show="!cols.contains('entity_name')" column="entity_name">{{c.entity_name}}</td>
										<td ng-show="!cols.contains('entity_brand_name')" column="entity_brand_name">{{c.entity_brand_name}}</td>
										<td ng-show="!cols.contains('entity_group_name')" column="entity_group_name">{{c.entity_group_name}}</td>
										<td ng-show="!cols.contains('insBrokeName')" column="insBrokeName">{{c.insBrokeName}}</td>
										<td ng-show="!cols.contains('renewalCount')" column="renewalCount">{{c.renewalCount}}</td>
										<td ng-show="!cols.contains('totalAmount')" column="totalAmount">{{c.totalAmount}}</td>
										<td ng-show="!cols.contains('totalTrafficAmount')" column="totalTrafficAmount">{{c.totalTrafficAmount}}</td>
										<td ng-show="!cols.contains('totalBusinessAmount')" column="totalBusinessAmount">{{c.totalBusinessAmount}}</td>
										<td ng-show="!cols.contains('renewalAmount')" column="renewalAmount">{{c.renewalAmount}}</td>
										<td ng-show="!cols.contains('rate')" column="rate">{{c.rate}}</td>
										<td ng-show="!cols.contains('renshouRate')" column="renshouRate">{{c.renshouRate}}</td>
										<td ng-show="!cols.contains('taipingyangRate')" column="taipingyangRate">{{c.taipingyangRate}}</td>
										<td ng-show="!cols.contains('pinganRate')" column="pinganRate">{{c.pinganRate}}</td>
										<td ng-show="!cols.contains('lianheRate')" column="lianheRate">{{c.lianheRate}}</td>
										<td ng-show="!cols.contains('otherRate')" column="otherRate">{{c.otherRate}}</td>
									</tr>

									<tr class="tbody_last_tr" ng-show="pagination.totalItems >0" >
										<td ng-show="!cols.contains('index')" ></td>
										<td ng-show="!cols.contains('entity_code')" column="entity_code"></td>
										<td ng-show="!cols.contains('entity_name')" column="entity_name"></td>
										<td ng-show="!cols.contains('entity_brand_name')" column="entity_brand_name"></td>
										<td ng-show="!cols.contains('entity_group_name')" column="entity_group_name"></td>
										<td ng-show="!cols.contains('NAME')" column="NAME"></td>
										<td ng-show="!cols.contains('renewalCount')" column="renewalCount">{{t.renewalCount |number:2}}</td>
										<td ng-show="!cols.contains('totalAmount')" column="totalAmount">{{t.totalAmount}}</td>
										<td ng-show="!cols.contains('totalTrafficAmount')" column="totalTrafficAmount">{{t.totalTrafficAmount}}</td>
										<td ng-show="!cols.contains('totalBusinessAmount')" column="totalBusinessAmount">{{t.totalBusinessAmount}}</td>
										<td ng-show="!cols.contains('renewalAmount')" column="renewalAmount">{{t.renewalAmount | number:2}}</td>
										<td ng-show="!cols.contains('rate')" column="rate"></td>
										<td ng-show="!cols.contains('renshouRate')" column="renshouRate"></td>
										<td ng-show="!cols.contains('taipingyangRate')" column="taipingyangRate"></td>
										<td ng-show="!cols.contains('pinganRate')" column="pinganRate"></td>
										<td ng-show="!cols.contains('lianheRate')" column="lianheRate"></td>
										<td ng-show="!cols.contains('otherRate')" column="otherRate"></td>
									</tr>
								</tbody>
							</table>
<div class="no-items" ng-show="pagination.totalItems <= 0">暂无数据</div>
						</div>
						<tm-pagination conf="pagination"></tm-pagination>
					</div>
				</section>
				<!--表格显示区域-->

			</div>
		</div>
	</div>
	

	 
	 
</div>

<form id="export_form" action="perfo/exportRenewal"  method="post">
	<input type="hidden" name="keys" id="keys" />
	<input type="hidden" name="names" id="names" /> 
	<input type="hidden" name="params" id="params" />
	<input type="hidden" name="file_name" id="file_name" value="续保"/>
</form>
